# import paho.mqtt.client as mqtt
# import paho.mqtt.subscribe as subscribe
# import paho.mqtt.publish as publish
#
#
# HOST = '0.0.0.0'
# PORT = 1883
#
#
# def on_message(client, userdata, message):
#         print('id:', message.mid, message.topic + ':' + message.payload.decode())
#         k = message.topic
#         if k == 'shutdown':
#                 print('***********************')
#                 publish.single(topic='shutdown', payload='123123')
#                 client.disconnect()
#
#
# def on_connected(client, userdata, flags, rc):
#         client.subscribe(topic=topic)
#         client.publish(topic='connecting', payload='12123')
#
#         print(1)
#
#
# def on_disconnected(client, userdata, rc):
#         print(2)
#
#
# def on_subscribe(client, userdata, mid, granted_qos):
#         print(11)
#
#
# client = mqtt.Client(client_id='2233')
# topic = '#'
#
# client.on_connect = on_connected
# client.on_subscribe = on_subscribe
# client.on_message = on_message
# client.on_disconnect = on_disconnected
# client.will_set(topic='error', payload='错误断开!!')  # will只能在外面设置
#
# client.connect(host=HOST, port=PORT)
# client.loop_forever()
#



from model.deviceModel import update_dev_param, update_dev_statistics_info

if __name__ == '__main__':
        # update_dev_param(device_id=15, clean_all_old=True)
        update_dev_statistics_info(device_id='15', clean_all_old=True)